import './App.css';
import Topic from './view/topic/index';
import {Link,Switch,Route} from "react-router-dom";

import {route} from './router/index';

function App() {
  return (
    <div className="App">
      <Link to="/topic/615d0389fe0c5184d0aecc53" >纯 html 缩进的写法</Link>
      <Link to="/topic/615d0389fe0c51" >纯 html 缩进的写法</Link>

      <br/>

      <Switch>
        {
          route.map((item,index) => <Route
            path={item.path} 
            exact={item.exact} 
            render={ (props) => {
              console.log('---',props);
              return item.render(props)
              
            }}
            key={index} 

            /> )
          
        }
      </Switch>
    </div>
  );
}

export default App;
